<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<base target="_self" />
<title>部门管理</title>
<script>
	function retrunValue() {
		var $item = $("input[name='radio']:checked").val();
		var $item1 = $("input:checked").attr("id");
		var $math = $item1.substring(5, 6);
		var $depName = $("#depName" + $math).html();
		window.returnValue = {
			id : $item,
			depName : $depName
		};
		window.close();
	}
</script>
</head>
<body>
<form id="mainForm" action="" method="get"><input type="hidden"
	name="page.pageNo" id="pageNo" value="${page.pageNo}" /> <input
	type="hidden" name="page.orderBy" id="orderBy" value="${page.orderBy}" />
<input type="hidden" name="page.order" id="order" value="${page.order}" />

<div id="message"><s:actionmessage theme="custom"
	cssClass="success" /></div>
<div id="filter">部门名称: <input type="text"
	name="filter_EQS_depName" value="${param['filter_EQS_depName']}"
	size="9" /> 部门全称: <input type="text" name="filter_LIKES_depAllName"
	value="${param['filter_LIKES_depAllName']}" size="9" /> 机构代码: <input
	type="text" name="filter_LIKES_depCode"
	value="${param['filter_LIKES_depCode'] }" size="9" /> 机构类别: <input
	type="text" name="filter_LIKES_depType"
	value="${param['filter_LIKES_depType'] }" size="9" /> <input
	type="button" value="搜索" onclick="search();" /></div>
<div id="content">
<table id="contentTable">
	<tr>
		<th>选择</th>
		<th><a href="javascript:sort('depName','asc')">部门名称</a></th>
		<th><a href="javascript:sort('depAllName','asc')">部门全称</a></th>
		<th><a href="javascript:sort('depCode','asc')">机构代码</a></th>
		<th><a href="javascript:sort('depType','asc')">机构类别</a></th>
		<th>职工人数</th>
		<th>所属单位</th>
	</tr>

	<c:forEach items="${page.result }" var="department"
		varStatus="var">
		<tr>
			<td><input type="radio" name="radio" id="radio${var.count }"
				value="<c:out value='${department.id}'/>" /></td>
			<td id="depName${var.count }">${department.depName}</td>
			<td>${department.depAllName}&nbsp;</td>
			<td>${department.depCode}&nbsp;</td>
			<td>${department.depType}&nbsp;</td>
			<td>${department.staffers}&nbsp;</td>
			<td>${department.organization.orgName }</td>
		</tr>
	</c:forEach>
	<tr>
		<td colspan="8"><input type="button" onclick="retrunValue()"
			value="提交" /><input type="button"
			onclick="JavaScript:window.close();" value="关闭" /></td>
	</tr>
</table>
</div>
<div>第${page.pageNo}页, 共${page.totalPages}页 <a
	href="javascript:jumpPage(1)">首页</a> <s:if test="page.hasPre">
	<a href="javascript:jumpPage(${page.prePage})">上一页</a>
</s:if> <s:if test="page.hasNext">
	<a href="javascript:jumpPage(${page.nextPage})">下一页</a>
</s:if> <a href="javascript:jumpPage(${page.totalPages})">末页</a></div>
</form>
</body>
</html>
